/*
此代码由Rpc工具直接生成，非必要请不要修改此处代码
*/
#pragma warning disable
using System;
using TouchSocket.Core;
using TouchSocket.Sockets;
using TouchSocket.Rpc;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
namespace RpcProxy
{
public interface IFileManageService:TouchSocket.Rpc.IRemoteServer
{
///<summary>
///获取指定目录文件
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto> GetFilesAndFolders(System.String path,IInvokeOption invokeOption = default);
///<summary>
///获取指定目录文件
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>> GetFilesAndFoldersAsync(System.String path,IInvokeOption invokeOption = default);

///<summary>
///创建文件夹
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
System.String CreateFolder(System.String path,System.String folderName,IInvokeOption invokeOption = default);
///<summary>
///创建文件夹
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<System.String> CreateFolderAsync(System.String path,System.String folderName,IInvokeOption invokeOption = default);

///<summary>
///解压指定文件
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
System.String DecompressingFile(System.String path,IInvokeOption invokeOption = default);
///<summary>
///解压指定文件
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<System.String> DecompressingFileAsync(System.String path,IInvokeOption invokeOption = default);

}
public class FileManageService :IFileManageService
{
public FileManageService(IRpcClient client)
{
this.Client=client;
}
public IRpcClient Client{get;private set; }
///<summary>
///获取指定目录文件
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto> GetFilesAndFolders(System.String path,IInvokeOption invokeOption = default)
{
if(Client==null)
{
throw new RpcException("IRpcClient为空，请先初始化或者进行赋值");
}
object[] parameters = new object[]{path};
System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto> returnData=(System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>)Client.Invoke(typeof(System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>),"FileManage_GetFilesAndFolders",invokeOption, parameters);
return returnData;
}
///<summary>
///获取指定目录文件
///</summary>
public async Task<System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>> GetFilesAndFoldersAsync(System.String path,IInvokeOption invokeOption = default)
{
if(Client==null)
{
throw new RpcException("IRpcClient为空，请先初始化或者进行赋值");
}
object[] parameters = new object[]{path};
return (System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>) await Client.InvokeAsync(typeof(System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>),"FileManage_GetFilesAndFolders",invokeOption, parameters);
}

///<summary>
///创建文件夹
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public System.String CreateFolder(System.String path,System.String folderName,IInvokeOption invokeOption = default)
{
if(Client==null)
{
throw new RpcException("IRpcClient为空，请先初始化或者进行赋值");
}
object[] parameters = new object[]{path,folderName};
System.String returnData=(System.String)Client.Invoke(typeof(System.String),"FileManage_CreateFolder",invokeOption, parameters);
return returnData;
}
///<summary>
///创建文件夹
///</summary>
public async Task<System.String> CreateFolderAsync(System.String path,System.String folderName,IInvokeOption invokeOption = default)
{
if(Client==null)
{
throw new RpcException("IRpcClient为空，请先初始化或者进行赋值");
}
object[] parameters = new object[]{path,folderName};
return (System.String) await Client.InvokeAsync(typeof(System.String),"FileManage_CreateFolder",invokeOption, parameters);
}

///<summary>
///解压指定文件
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public System.String DecompressingFile(System.String path,IInvokeOption invokeOption = default)
{
if(Client==null)
{
throw new RpcException("IRpcClient为空，请先初始化或者进行赋值");
}
object[] parameters = new object[]{path};
System.String returnData=(System.String)Client.Invoke(typeof(System.String),"FileManage_DecompressingFile",invokeOption, parameters);
return returnData;
}
///<summary>
///解压指定文件
///</summary>
public async Task<System.String> DecompressingFileAsync(System.String path,IInvokeOption invokeOption = default)
{
if(Client==null)
{
throw new RpcException("IRpcClient为空，请先初始化或者进行赋值");
}
object[] parameters = new object[]{path};
return (System.String) await Client.InvokeAsync(typeof(System.String),"FileManage_DecompressingFile",invokeOption, parameters);
}

}
public static class FileManageServiceExtensions
{
///<summary>
///获取指定目录文件
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto> GetFilesAndFolders<TClient>(this TClient client,System.String path,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Rpc.IRpcClient{
object[] parameters = new object[]{path};
System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto> returnData=(System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>)client.Invoke(typeof(System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>),"FileManage_GetFilesAndFolders",invokeOption, parameters);
return returnData;
}
///<summary>
///获取指定目录文件
///</summary>
public static async Task<System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>> GetFilesAndFoldersAsync<TClient>(this TClient client,System.String path,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Rpc.IRpcClient{
object[] parameters = new object[]{path};
return (System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>) await client.InvokeAsync(typeof(System.Collections.Generic.List<Teriri.File.UniversalLib.Model.FileInfoDto>),"FileManage_GetFilesAndFolders",invokeOption, parameters);
}

///<summary>
///创建文件夹
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static System.String CreateFolder<TClient>(this TClient client,System.String path,System.String folderName,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Rpc.IRpcClient{
object[] parameters = new object[]{path,folderName};
System.String returnData=(System.String)client.Invoke(typeof(System.String),"FileManage_CreateFolder",invokeOption, parameters);
return returnData;
}
///<summary>
///创建文件夹
///</summary>
public static async Task<System.String> CreateFolderAsync<TClient>(this TClient client,System.String path,System.String folderName,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Rpc.IRpcClient{
object[] parameters = new object[]{path,folderName};
return (System.String) await client.InvokeAsync(typeof(System.String),"FileManage_CreateFolder",invokeOption, parameters);
}

///<summary>
///解压指定文件
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static System.String DecompressingFile<TClient>(this TClient client,System.String path,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Rpc.IRpcClient{
object[] parameters = new object[]{path};
System.String returnData=(System.String)client.Invoke(typeof(System.String),"FileManage_DecompressingFile",invokeOption, parameters);
return returnData;
}
///<summary>
///解压指定文件
///</summary>
public static async Task<System.String> DecompressingFileAsync<TClient>(this TClient client,System.String path,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Rpc.IRpcClient{
object[] parameters = new object[]{path};
return (System.String) await client.InvokeAsync(typeof(System.String),"FileManage_DecompressingFile",invokeOption, parameters);
}

}
public interface IAuthService:TouchSocket.Rpc.IRemoteServer
{
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
System.Boolean Login(System.String account,System.String password,IInvokeOption invokeOption = default);
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<System.Boolean> LoginAsync(System.String account,System.String password,IInvokeOption invokeOption = default);

}
public class AuthService :IAuthService
{
public AuthService(IRpcClient client)
{
this.Client=client;
}
public IRpcClient Client{get;private set; }
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public System.Boolean Login(System.String account,System.String password,IInvokeOption invokeOption = default)
{
if(Client==null)
{
throw new RpcException("IRpcClient为空，请先初始化或者进行赋值");
}
object[] parameters = new object[]{account,password};
System.Boolean returnData=(System.Boolean)Client.Invoke(typeof(System.Boolean),"Login",invokeOption, parameters);
return returnData;
}
///<summary>
///登录
///</summary>
public async Task<System.Boolean> LoginAsync(System.String account,System.String password,IInvokeOption invokeOption = default)
{
if(Client==null)
{
throw new RpcException("IRpcClient为空，请先初始化或者进行赋值");
}
object[] parameters = new object[]{account,password};
return (System.Boolean) await Client.InvokeAsync(typeof(System.Boolean),"Login",invokeOption, parameters);
}

}
public static class AuthServiceExtensions
{
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static System.Boolean Login<TClient>(this TClient client,System.String account,System.String password,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Rpc.IRpcClient{
object[] parameters = new object[]{account,password};
System.Boolean returnData=(System.Boolean)client.Invoke(typeof(System.Boolean),"Login",invokeOption, parameters);
return returnData;
}
///<summary>
///登录
///</summary>
public static async Task<System.Boolean> LoginAsync<TClient>(this TClient client,System.String account,System.String password,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Rpc.IRpcClient{
object[] parameters = new object[]{account,password};
return (System.Boolean) await client.InvokeAsync(typeof(System.Boolean),"Login",invokeOption, parameters);
}

}
}
